using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.DbInfos
{
    public class DbInfoConfig : IEntityTypeConfiguration<DbInfo>
    {
        public void Configure(EntityTypeBuilder<DbInfo> builder)
        {
            builder.HasComment("DB块信息表");
            builder.Property(x => x.DbName).IsRequired().HasMaxLength(30).HasComment("DB名");
            builder.Property(x => x.DbNum).HasComment("S7-DB块，MC-DB偏移量");
            builder.Property(x => x.DbLength).HasComment("DB块长度");
        }
    }
}